import socket
addr = '121.41.40.95' #服务器地址
port = 2621 #端口
message = 'user=huangyq@flyinggnss.com;pwd=fly888888;cmd=full;lat=30;lon=120;' #请求消

socket.setdefaulttimeout(4)
client = socket.socket()
client.connect((addr, port))

client.send(message.encode('utf-8'))

reply_data = []
while True:
    current_reply = client.recv(1024)
    if len(current_reply) == 0:
        break
    else:
        reply_data += current_reply

print("服务器返回")
print(reply_data)